/*---------------------------------------------------------------------------
;	board.h - The Board Pin Configuration Header File
;
;	Copyright (C) 2007 Our AMCT Corp.
; 	All rights reserved.
;	
;	License Type:	BSD
;	
;	Author:			Xu Chenxiang
;	File Version:	v0.1 (2007/07/11)
;	
;	File History:
;	v0.1 	Inital Release
;	
;	
;	
;---------------------------------------------------------------------------*/

#ifndef BOARD_H
#define BOARD_H

// Global C8051F Defines
#include "global.h"
#include "../device/c8051f120.h"
#include "../device/c8051f120_reg_def.h"


#define XRAM_INSTALL 1

// CPU clock speed choose
#define F_CPU	24000000
// #define F_CPU	16000000               		// 16MHz processor
// #define F_CPU	14745000               		// 14.745MHz processor
// #define F_CPU	8000000               		// 8MHz processor
// #define F_CPU	7372800               		// 7.37MHz processor
// #define F_CPU	4000000               		// 4MHz processor
// #define F_CPU	3686400               		// 3.69MHz processor
#define CYCLES_PER_US ((F_CPU+500000)/1000000) 	// cpu cycles per microsecond



// ZLG7289 - LED and Key I/O Chip
sbit ZLG7289_CS		= P4^2;
sbit ZLG7289_CLK	= P3^2;
sbit ZLG7289_DIO	= P0^5;
sbit ZLG7289_INT	= P3^4;

// GPIO LED - General Purpose Port with LED
sbit GPIO_LED0		= P3^5;
sbit GPIO_LED1		= P3^6;
sbit GPIO_LED2		= P3^7;

// AT45DB081B - 1M*8Bit Flash Chip (SPI Controlled FLASH CHIP)
sbit FLASH_SPIMOSI	= P0^4;
sbit FLASH_SPIMISO	= P0^3;
sbit FLASH_SPICS	= P4^1;
sbit FLASH_SPISCLK	= P0^2;

// MS12864D - KS0108 Based Graphic LCD Displayer
sbit LCD0108_CS1	= P5^6;
sbit LCD0108_CS2	= P5^7;
sbit LCD0108_RW		= P5^5;
sbit LCD0108_RS		= P5^4;
sbit LCD0108_E		= P5^3;



#endif
